from dubbo_client.config import ApplicationConfig
from dubbo_client.registry import ZookeeperRegistry
from dubbo_client.rpclib import DubboClient

config = ApplicationConfig('test_rpclib')
service_interface = 'com.bussanq.microsvc.HelloService'
# Contains a connection to zookeeper, which needs caching.
registry = ZookeeperRegistry('10.2.111.51:2181', config)
user_provider = DubboClient(service_interface, registry, version='1.0.0')
try:
    print(user_provider.sayHello('mangaq1'))
except Exception as e:
    print(e)
